package cn.edu.xmu.orderpayment.payment.microservice.wechatpayvo;

import cn.edu.xmu.orderpayment.payment.model.bo.Amount;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class RefundAmountVo{
    private Integer refund;
    private Integer total;
    private String currency;

    RefundAmountVo(Amount amount){
        this.refund= Math.toIntExact(amount.getRefund());
        this.total= Math.toIntExact(amount.getTotal());
        this.currency=amount.getCurrency();
    }
}
